#include "slope.h"
#include "point2.h"
#include "texture.h"
#include "object.h"

Slope::Slope(){
	texture =NULL;
	pLo =NULL;
	pHi =NULL;
	pLo_ph =NULL;
	pHi_ph =NULL;
	position =NULL;
}

Slope::~Slope(){
	delete texture;
	texture =NULL;
	delete pLo;
	pLo =NULL;
	delete pHi;
	pHi =NULL;
	delete pLo_ph;
	pLo_ph =NULL;
	delete pHi_ph;
	pHi_ph =NULL;
	delete position;
	position =NULL;
}

float Slope::get_xLo(){

	float x;

	x =pLo_ph->x;
	if(pHi_ph->x <x)
		x =pHi_ph->x;

	return position->x + x;
}

float Slope::get_xHi(){

	float x;

	x =pLo_ph->x;
	if(pHi_ph->x >x)
		x =pHi_ph->x;

	return position->x + x;
}

float Slope::get_yLo(){

	return 1;
}

float Slope::get_yHi(){

	return 1;
}
